<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="./animate.css">
  <style>
    .box{
      width:200px;
      height: 200px;
      background-color: tomato;
      margin: 30px auto;
    }
    .fade-enter-active{
      animation:zoomInDown 1s ;
    }
    .fade-leave-active{
      animation: zoomOutDown 1s;
    }
    
  </style>
  
</head>
<body>
  <div id="app">
    <button @click="isShow = !isShow">{{ isShow?'消失':'显示' }}</button>
    <transition name="fade" mode="out-in">
      <div v-if="isShow"class="box">div1</div>
    </transition>
  </div>
  <script src="./vue.js"></script>
  <script>
    
    const vm = new Vue({
      el: '#app',
      data:{
        isShow: false
      }
    })
  </script>
</body>
</html>